﻿using System;
using System.Windows.Forms;

namespace TransporteAgua
{
    public partial class frmLogin : Form
    {
        frmPrincipal parent;

        public frmLogin(frmPrincipal padre)
        {
            InitializeComponent();
            parent = padre as frmPrincipal;
            this.Owner = padre;
            this.Show(padre);
        }
        private void btnAceptar_Click(object sender, EventArgs e)
        {            
            parent.conectar(txtHost.Text,txtUsuario.Text,txtPassword.Text);
            Close();
        }
        private void frmLogin_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;
            Hide();
        }
    }
}
